|
|
Thorsten Froehlich wrote:
> I assume you tried with a shell which was already pointed out as broken.
> Then maybe you are just incompetent to run the test because on a FreeBSD
> 5.2-CURRENT as well as on Mac OS X 10.3.4 a simple program like
>
No. On all systems mentioned above, I tried using the following programs:
-----<test.c>------
#include <stdlib.h>
#include <stdio.h>
#include <sys/wait.h>
int main(int ac, char **av)
{
int rv=system("./test2");
printf("Result: %x %x\n", rv,WEXITSTATUS(rv));
return 0;
}
-----<test2.c>------
#include <stdio.h>
int main()
{
printf("Here we are\n");
return(0x1aa);
}
--------------------
And the result is what I described.
> int main()
> {
> return 12345;
> }
>
> will yield the correct result when executed by system().
>
This is not the case on any system I tested (Darwin-PPC, Linux-ix86,
FreeBSD-ix86, NetBSD-ix86, Solaris-5.9-ix86).
Not even with magic number 12345 :)
You might exactly specify the system you are referring to.
> As such, any such system cannot be expected to be fully supported by
[snipped following arrogance from Thorsten-Froehlich]
Wolfgang
Post a reply to this message
|
|